package com.example.wuqujingdianphone.view;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.example.wuqujingdianphone.R;
import com.example.wuqujingdianphone.view.banner.loader.ImageLoader1;


public class GlideImageLoader1 extends ImageLoader1 {
    @Override
    public void displayImage(Context context, Object path, CustomScaleView1 imageView) {
        //具体方法内容自己去选择，次方法是为了减少banner过多的依赖第三方包，所以将这个权限开放给使用者去选择
//        Glide.with(context.getApplicationContext())
//                .load(path)
//                .crossFade()
//                .into(imageView);

//        GlideUtil.loadImgCenterCrop(context.getApplicationContext(), (String) path, R.color.bac_color,imageView);
        Glide.with(context.getApplicationContext())
                .load((String) path)
                .error(R.color.bac_color)
                .placeholder(R.color.bac_color)
                .centerCrop()
                .into(imageView);
//        GlideUtil.loadImgCenterCropObj(context.getApplicationContext(), path, R.drawable.loading_failed, imageView);
    }


}
